﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

namespace EFModel.Migrations
{
    public partial class lp : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "salary_grant",
                columns: table => new
                {
                    sgr_id = table.Column<int>(nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    salary_grant_id = table.Column<string>(maxLength: 300, nullable: true),
                    salary_standard_id = table.Column<string>(maxLength: 300, nullable: true),
                    first_kind_id = table.Column<int>(nullable: false),
                    first_kind_name = table.Column<string>(maxLength: 300, nullable: true),
                    second_kind_id = table.Column<int>(nullable: false),
                    second_kind_name = table.Column<string>(maxLength: 300, nullable: true),
                    third_kind_id = table.Column<int>(nullable: false),
                    third_kind_name = table.Column<string>(maxLength: 300, nullable: true),
                    human_amount = table.Column<int>(nullable: false),
                    salary_standard_sum = table.Column<double>(nullable: false),
                    salary_paid_sum = table.Column<double>(nullable: false),
                    register = table.Column<string>(maxLength: 300, nullable: true),
                    regist_time = table.Column<DateTime>(nullable: false),
                    checker = table.Column<string>(maxLength: 300, nullable: true),
                    check_time = table.Column<DateTime>(nullable: false),
                    check_status = table.Column<int>(nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_salary_grant", x => x.sgr_id);
                });

            migrationBuilder.CreateTable(
                name: "salary_grant_details",
                columns: table => new
                {
                    grd_id = table.Column<int>(nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    salary_grant_id = table.Column<string>(maxLength: 300, nullable: true),
                    human_id = table.Column<string>(maxLength: 300, nullable: true),
                    human_name = table.Column<string>(maxLength: 300, nullable: true),
                    bouns_sum = table.Column<double>(nullable: false),
                    sale_sum = table.Column<double>(nullable: false),
                    deduct_sum = table.Column<double>(nullable: false),
                    salary_standard_sum = table.Column<double>(nullable: false),
                    salary_paid_sum = table.Column<double>(nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_salary_grant_details", x => x.grd_id);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "salary_grant");

            migrationBuilder.DropTable(
                name: "salary_grant_details");
        }
    }
}
